import { DataSource, EntityMetadata, EntityTarget, QueryBuilder, QueryRunner } from 'typeorm'
import { RelationMetadata } from 'typeorm/metadata/RelationMetadata.js'
import { ColumnMetadata } from 'typeorm/metadata/ColumnMetadata.js'
import { DriverUtils } from 'typeorm/driver/DriverUtils.js'
import { v4 } from 'uuid'
import { pick, uniq } from 'lodash-es'
import { Find } from './Find'
import { isObject } from '@vue/shared'
import { BroadcasterResult } from 'typeorm/subscriber/BroadcasterResult.js'
import { getProp, isFK } from './utils'

export type UpdateOptions = {
  data: any
  where?: any
}

export const Update = async (target: EntityTarget<any> | EntityMetadata, opt: UpdateOptions, connection: DataSource, queryRunner?: QueryRunner) => {
  console.log('todo Update');
  return await {}
}

export const UpdateMany = async (target: EntityTarget<any> | EntityMetadata, opt: UpdateOptions, connection: DataSource, queryRunner?: QueryRunner) => {
  console.log('todo UpdateMany');
  return await {}
}